<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>结算订单</title>
  <link rel="stylesheet" href="css/checkout.css">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body>
<div class="container">
  <header>
    <h1><i class="fas fa-cash-register"></i> 结算订单</h1>
  </header>

  <div class="checkout-container">


    <div class="checkout-section">
      <h2><i class="fas fa-map-marker-alt"></i> 选择收货地址</h2>
      <div id="addressList" class="address-list">
        <!-- 地址列表将通过JS动态加载 -->
      </div>
      <input type="hidden" id="selectedAddressId">
    </div>

    <div class="checkout-section">
      <h2><i class="fas fa-shopping-cart"></i> 订单商品</h2>
      <div id="orderItemsList" class="order-items-list">
        <table>
          <thead>
          <tr>
            <th>商品信息</th>
            <th>单价</th>
            <th>数量</th>
            <th>小计</th>
          </tr>
          </thead>
          <tbody id="orderItemsBody">
          <!-- 商品列表将通过JS动态加载 -->
          </tbody>
        </table>
      </div>
    </div>

    <div class="checkout-summary">
      <div class="summary-item">
        <span>商品总价：</span>
        <span id="totalPrice">¥0.00</span>
      </div>
      <div class="summary-item">
        <span>运费：</span>
        <span id="freight">¥0.00</span>
      </div>
      <div class="summary-item total">
        <span>应付总额：</span>
        <span id="paymentAmount">¥0.00</span>
      </div>
      <button id="submitOrderBtn" class="submit-order-btn">
        <i class="fas fa-check-circle"></i> 提交订单
      </button>
    </div>
  </div>
</div>

<script src="js/checkout.js"></script>
</body>
</html>